#ifndef _WS_COMM_ERRNO_H_
#define _WS_COMM_ERRNO_H_

#ifdef __cplusplus
extern "C" {

namespace ws_utility
{
#endif

typedef enum
{
    WS_SUCCESS = 0, 

    WS_ERR_TimeOut = 8 ,
    
    WS_ERR_GUI_BASE = 0x40000000,
    WS_ERR_GUI_EVENT_HAPPEN = WS_ERR_GUI_BASE + 0x01,
    WS_ERR_GUI_OPERATE_ERR = WS_ERR_GUI_BASE + 0x2,
    WS_ERR_GUI_ADD_PLAYBACK_TASK_NODE_FAIL_WITH_INVALID_PARA = WS_ERR_GUI_BASE + 0x3,
    WS_ERR_GUI_ADD_PLAYBACK_TASK_NODE_FAIL_WITH_MALLOC = WS_ERR_GUI_BASE + 0x4,
    WS_ERR_GUI_GET_PLAYBACK_TASK_NODE_EMPTY = WS_ERR_GUI_BASE + 0x5,
    WS_ERR_GUI_GET_PLAYBACK_TASK_NODE_TYPE_ERROR = WS_ERR_GUI_BASE + 0x6,
    WS_ERR_GUI_GET_PLAYBACK_NO_CHOOSE_CHANNEL = WS_ERR_GUI_BASE + 0x7,
    WS_ERR_GUI_PLAYBACK_FLASH_COLO_MALLOC_FAIL = WS_ERR_GUI_BASE + 0x8,
    WS_ERR_GUI_PLAYBACK_FLASH_COLO_PARAM_INVALID  = WS_ERR_GUI_BASE + 0x9,
    WS_ERR_GUI_PLAYBACK_INQUIRE_HAVE_NO_DATA = WS_ERR_GUI_BASE + 0xA,
    WS_ERR_GUI_PLAYBACK_INQUIRE_MALLOC_FAIL = WS_ERR_GUI_BASE + 0xB,
    WS_ERR_GUI_PLAYBACK_SEL_CH_OPS_MALLOC_FAIL =  WS_ERR_GUI_BASE + 0xC,
    WS_ERR_GUI_PLAYBACK_SEL_CH_OPS_PARAM_INVALID =  WS_ERR_GUI_BASE + 0xD,
    WS_ERR_GUI_PLAYBACK_SEL_CH_OPS_LIST_EMPTY =  WS_ERR_GUI_BASE + 0xE,
    WS_ERR_GUI_PLAYBACK_SEL_CH_OPS_ADD_FAIL =  WS_ERR_GUI_BASE + 0xF,
    WS_ERR_GUI_MALLOC_NODE_FAIL=WS_ERR_GUI_BASE + 0x10,	
    WS_ERR_GUI_FIND_NODE_FAIL=WS_ERR_GUI_BASE+0x11,
    WS_ERR_GUI_DELETED_NODE_ERR=WS_ERR_GUI_BASE+0x12,
    WS_ERR_GUI_DEL_NODE_ERR=WS_ERR_GUI_BASE +0x13,	
    WS_ERR_GUI_NO_LIST_ERR=WS_ERR_GUI_BASE+0x14,	
    WS_ERR_PRO_GUI_CREAT_DEVICE_ICON_FAIL = WS_ERR_GUI_BASE + 0x15,
    WS_ERR_PRO_GUI_MALLOC_FAIL = WS_ERR_GUI_BASE + 0x16,
    WS_ERR_PRO_GUI_TIME_ERR=WS_ERR_GUI_BASE+0x17,   
    WS_ERR_GROUP_NAME_COUNT_RESTRICTION = WS_ERR_GUI_BASE + 0x18,
    
    //-------------------------------Http_server ------------------------
    WS_ERR_NTES_BASE = 0x40010000,
    WS_ERR_HTTP_STOP_ERR = WS_ERR_NTES_BASE + 0x01,
    WS_ERR_HTTP_DESTORY_THREAD_ERR = WS_ERR_NTES_BASE + 0x02,

    //------------------------------- Model ------------------------
    WS_ERR_MODEL_BASE = 0x40020000,
    WS_ERR_MODEL_INVALID_PARA   = WS_ERR_MODEL_BASE + 0x01,
    WS_ERR_MODEL_NOT_INIT       = WS_ERR_MODEL_BASE + 0x02, 
    WS_ERR_MODEL_OPERATE_FAIL   = WS_ERR_MODEL_BASE + 0x03,
    WS_ERR_MODEL_IP_REUSE           = WS_ERR_MODEL_BASE + 0x04,
    WS_ERR_MODEL_CHANNEL_LOSE   = WS_ERR_MODEL_BASE + 0x05,
    WS_ERR_MODEL_EXPORT_LOG_FAIL    = WS_ERR_MODEL_BASE + 0x06,
    WS_ERR_MODEL_CREATE_REBOOT_THR_FAIL = WS_ERR_MODEL_BASE + 0x07,
    WS_ERR_MODEL_SDI_NOT_SUPPORT = WS_ERR_MODEL_BASE + 0x08,
    WS_ERR_MODEL_NOT_REGISTER   = WS_ERR_MODEL_BASE + 0x09,     
    WS_ERR_MODEL_FAMILY_NOT_SUPPORT = WS_ERR_MODEL_BASE + 0x0A,    
    WS_ERR_MODEL_ADD_SEND_EMAIL_NODE =WS_ERR_MODEL_BASE + 0x0B,  
    
    //------------------------------- Record ------------------------
    WS_ERR_REC_BASE = 0x40030000,
    WS_ERR_REC_INVALID_PARA = WS_ERR_REC_BASE + 0x01,
    WS_ERR_REC_NOT_INIT     = WS_ERR_REC_BASE + 0x02,  
    WS_ERR_REC_OPERATE_FAIL = WS_ERR_REC_BASE + 0x03,

    //------------------------------- Playback ------------------------
    WS_ERR_PLAY_BASE = 0x40040000,
    WS_ERR_PLAY_INVALID_PARA    = WS_ERR_PLAY_BASE + 0x01,
    WS_ERR_PLAY_NOT_INIT        = WS_ERR_PLAY_BASE + 0x02, 
    WS_ERR_PLAY_OPERATE_FAIL    = WS_ERR_PLAY_BASE + 0x03,
    WS_ERR_PLAY_DO_SECOND_TIME  = WS_ERR_PLAY_BASE + 0x04,
    WS_ERR_PLAY_REGISTER_FAIL   = WS_ERR_PLAY_BASE + 0x05,

    //------------------------------- Backup ------------------------
    WS_ERR_BKUP_BASE = 0x40050000,
    WS_ERR_BACKUP_INVALID_PARA = WS_ERR_BKUP_BASE + 0x01,
    WS_ERR_BACKUP_NOT_INIT = WS_ERR_BKUP_BASE + 0x02,
    WS_ERR_BACKUP_OPERATE_FAIL = WS_ERR_BKUP_BASE + 0x03,
    WS_ERR_BACKUP_TIME_FAIL = WS_ERR_BKUP_BASE + 0x04,
    WS_ERR_BACKUP_AVI_CREAT_FILE_FAIL = WS_ERR_BKUP_BASE + 0x05,
    WS_ERR_BACKUP_AVI_OPEN_FILE_FAIL = WS_ERR_BKUP_BASE + 0x06,
    WS_ERR_BACKUP_AVI_DATE_PARA = WS_ERR_BKUP_BASE + 0x07,
    WS_ERR_BACKUP_AVI_SPACE_PARA = WS_ERR_BKUP_BASE + 0x08,
    WS_ERR_BACKUP_AVI_NAME_PARA = WS_ERR_BKUP_BASE + 0x09,
    WS_ERR_BACKUP_ERROR_TIME_RANGE = WS_ERR_BKUP_BASE + 0x10,	

    //------------------------------- Network ------------------------
    WS_ERR_NETW_BASE = 0x40060000,
    WS_NETWORK_CREAT_SOCKET_ERR = WS_ERR_NETW_BASE + 0x1,
    WS_NETWORK_PTH_SEND_ERR = WS_ERR_NETW_BASE + 0x2,
    WS_NETWORK_PTH_RECV_ERR = WS_ERR_NETW_BASE + 0x3,
    WS_NETWORK_GET_MAC_ERR = WS_ERR_NETW_BASE + 0x4,
    WS_NETWORK_MAC_IOCTL_ERR = WS_ERR_NETW_BASE + 0x5,
    WS_NETWORK_GET_IP_ERR = WS_ERR_NETW_BASE + 0x6,

    WS_NETWORK_SEND_ERR = WS_ERR_NETW_BASE + 0x7,
    WS_NETWORK_SEND_REPLY_ERR = WS_ERR_NETW_BASE + 0x8,
    WS_NETWORK_SFLAG_ERR = WS_ERR_NETW_BASE + 0x9,
    WS_NETWORK_SET_STATUS_ERR = WS_ERR_NETW_BASE + 0x10,

    WS_NETWORK_STATUS_ERR = WS_ERR_NETW_BASE + 0x11,
    WS_NETWORK_DHCP_IP_ERR = WS_ERR_NETW_BASE + 0x12,

    WS_NETWORK_PRA_ERR = WS_ERR_NETW_BASE + 0x13,
    WS_NETWORK_IOCTL_ERR = WS_ERR_NETW_BASE + 0x14,
    WS_NETWORK_PPPOE_CON_ERR = WS_ERR_NETW_BASE + 0x15,
    WS_NETWORK_OPEN_ERR = WS_ERR_NETW_BASE + 0x16,
    WS_NETWORK_TIEM_ERR = WS_ERR_NETW_BASE + 0x17,
    WS_NETWORK_GETINFO_ERR = WS_ERR_NETW_BASE + 0x18,

    WS_NETWORK_CONNECT_ERR = WS_ERR_NETW_BASE + 0x19,
    WS_NETWORK_RECV_ERR = WS_ERR_NETW_BASE + 0x20,
    WS_NETWORK_FIND_ERR = WS_ERR_NETW_BASE + 0x21,
    WS_NETWORK_NTP_GET_TIME_ERR = WS_ERR_NETW_BASE + 0x22,
    WS_NETWORK_GET_PPPOE_IP_ERR = WS_ERR_NETW_BASE + 0x23,

    WS_NETWORK_EMAIL_USER_OVER  = WS_ERR_NETW_BASE + 0x24,
    WS_NETWORK_EMAIL_SEND_ERR = WS_ERR_NETW_BASE + 0x25,
    WS_NETWORK_EMAIL_NOT_INIT = WS_ERR_NETW_BASE + 0x26,

    WS_NETWORK_CREATE_CHANGE_IP_THREAD_FAIL = WS_ERR_NETW_BASE + 0x27,
    WS_ERR_EMAIL_SEND_ERROR = WS_ERR_NETW_BASE + 0x28,
    WS_NETWORK_EMAIL_NODE_ERROR = WS_ERR_NETW_BASE + 0x29,

    WS_NETWORK_IP_CFG_CALL_NULL = WS_ERR_NETW_BASE + 0x30, 
    WS_NETWORK_NOT_WIFI_DEV = WS_ERR_NETW_BASE + 0x31,
    WS_NETWORK_INVALID_PARA = WS_ERR_NETW_BASE + 0x32,

    WS_NETWORK_NO_INIT = WS_ERR_NETW_BASE + 0x100,
    WS_NETWORK_NOT_SUPPORT = WS_ERR_NETW_BASE + 0x200,

	WS_NETWORK_NET_PORT_ERROR = WS_ERR_NETW_BASE + 0x201, 

    //------------------------------- DST ------------------------
    WS_ERR_DST_BASE = 0x40070000,
    WS_ERR_DST_NOT_INIT = WS_ERR_DST_BASE + 0x1,
    WS_ERR_DST_NOT_SUPPORT = WS_ERR_DST_BASE + 0x2,

    //------------------------------- Dev_probe ------------------------
    WS_ERR_PROB_BASE = 0x40090000,
    WS_ERR_PROB_THREAD_PROBE_ERR = WS_ERR_PROB_BASE + 0x1,
    WS_ERR_PROB_THREAD_REASPONSE_ERR = WS_ERR_PROB_BASE + 0x2,
    WS_ERR_PROB_CREAT_MAM_ERR = WS_ERR_PROB_BASE + 0x3,
    WS_ERR_PROB_FLAE_ERR = WS_ERR_PROB_BASE + 0x4,
    WS_ERR_PROB_SOCKET_ERR = WS_ERR_PROB_BASE + 0x5,
    WS_ERR_PROB_SOCKET_SETOP_ERR = WS_ERR_PROB_BASE + 0x6,
    WS_ERR_PROB_SOCKET_NODATA_ERR = WS_ERR_PROB_BASE + 0x7,
    WS_ERR_MAG_0_ERR = WS_ERR_PROB_BASE + 0x8,
    WS_ERR_MAG_1_ERR = WS_ERR_PROB_BASE + 0x9,
    WS_ERR_XML_LEN_ERR = WS_ERR_PROB_BASE + 0x10,
    WS_ERR_SEND_ERR = WS_ERR_PROB_BASE + 0x11,
    WS_ERR_GETNUM_ERR = WS_ERR_PROB_BASE + 0x12,
    WS_ERR_SET_CMDPORT_ERR = WS_ERR_PROB_BASE + 0x13,
    WS_ERR_SET_MEDIAPORT_ERR = WS_ERR_PROB_BASE + 0x14,
    WS_ERR_START_DIS_ERR = WS_ERR_PROB_BASE + 0x15,
    WS_ERR_START_RES_ERR = WS_ERR_PROB_BASE + 0x16,
    WS_ERR_STOP_RES_ERR = WS_ERR_PROB_BASE + 0x17,
    WS_ERR_ISMYSELF_ERR = WS_ERR_PROB_BASE + 0x18,
    WS_ERR_LIST_IS_HAVE_ERR = WS_ERR_PROB_BASE + 0x19,
    WS_ERR_LOCK_TIME_ERR = WS_ERR_PROB_BASE+0x20,  

    //------------------------------- Cfg_manage ------------------------
    WS_ERR_CFGM_BASE = 0x400A0000,
    WS_ERR_CFGM_NOT_INIT        = WS_ERR_CFGM_BASE + 0x01,
    WS_ERR_CFGM_OPERATE_FAIL    = WS_ERR_CFGM_BASE + 0x02,
    WS_ERR_CFGM_INVALID_PARA    = WS_ERR_CFGM_BASE + 0x14,  

    //------------------------------- Usr_manage ------------------------
    WS_ERR_USRM_BASE = 0x400B0000,
    WS_ERR_USRM_OPERATE_FAIL    = WS_ERR_USRM_BASE + 0x02,
    WS_ERR_USRM_INVALID_PARA    = WS_ERR_USRM_BASE + 0x14,  
    WS_ERR_USRM_NOT_PERMIT      = WS_ERR_USRM_BASE + 0x15,  
    WS_ERR_USRM_PASSWD_ERR      = WS_ERR_USRM_BASE + 0x16, 
    WS_ERR_USRM_PASSWD_NOT_SAME = WS_ERR_USRM_BASE + 0x20, 
    WS_ERR_USRM_NOT_NAME        = WS_ERR_USRM_BASE + 0x20,  
    WS_ERR_USRM_PASSWD_NOT_EMPTY = WS_ERR_USRM_BASE + 0x21, 
    WS_ERR_USRM_LOGIN_INVALID   = WS_ERR_USRM_BASE + 0x22,  
    WS_ERR_USRM_EXIST           = WS_ERR_USRM_BASE + 0x23,  
    WS_ERR_USRM_NOT_INIT        = WS_ERR_USRM_BASE + 0x102, 
    WS_ERR_USRM_CHAR_ILLEGAL    = WS_ERR_USRM_BASE + 0x103,
    WS_ERR_USEM_CHAR_RESTRICTION = WS_ERR_USRM_BASE + 0x104,

    //------------------------------- Log_manage ------------------------
    WS_ERR_LOGM_BASE = 0x400C0000,
    WS_ERR_LOGM_OPERATE_FAIL    = WS_ERR_LOGM_BASE + 0x01,
    WS_ERR_LOGM_INVALID_PARA    = WS_ERR_LOGM_BASE + 0x02,
    WS_ERR_LOGM_REGISTER_FAIL   = WS_ERR_LOGM_BASE + 0x03,
    WS_ERR_LOGM_NOT_INIT        = WS_ERR_LOGM_BASE + 0x04, 

    //------------------------------- Recfile_manage ------------------------
    WS_ERR_RFM_BASE = 0x400D0000,
    WS_ERR_RFM_INVALID_PARA = WS_ERR_RFM_BASE + 0x01,
    WS_ERR_RFM_NOT_INIT     = WS_ERR_RFM_BASE + 0x02,   
    WS_ERR_RFM_OPERATE_FAIL = WS_ERR_RFM_BASE + 0x03,
    WS_ERR_RFM_NO_FILE	 	= WS_ERR_RFM_BASE + 0x04,   
    WS_ERR_RFM_MALLOC_FAIL  = WS_ERR_RFM_BASE + 0x05,
    WS_ERR_RFM_NODE_EMPTY   = WS_ERR_RFM_BASE + 0x06,
    WS_ERR_RFM_NOT_NEED_TO_SEARCH = WS_ERR_RFM_BASE + 0X07,	

    //------------------------------- Recfile_rw ------------------------
    WS_ERR_RFRW_BASE = 0x400E0000,
    WS_ERR_RFRW_OPERATE_FAIL    = WS_ERR_RFRW_BASE + 0x02,
    WS_ERR_RFRW_DIFFERENT_FILE_FORMAT,

    //------------------------------- Disk_manage ------------------------
    WS_ERR_DISKM_BASE           = 0x400F0000,
    WS_ERR_DISKM_OPERATE_FAIL   = WS_ERR_DISKM_BASE + 0x02,
    WS_ERR_DISKM_INVALID_PARA   = WS_ERR_DISKM_BASE + 0x14, 
    WS_ERR_DISK_FORMATING     =  WS_ERR_DISKM_BASE + 0x06,	
    WS_ERR_DISKM_NOT_INIT       = WS_ERR_DISKM_BASE + 0x102, 
    WS_ERR_DISKM_OPERATE_COMPLETED = WS_ERR_DISKM_BASE + 0x104,
    WS_ERR_DISKM_PART_NOT_MOUNT = WS_ERR_DISKM_BASE + 0x105,
    WS_ERR_DISKM_PART_FMT_ERROR = WS_ERR_DISKM_BASE + 0x106,
    WS_ERR_DISKM_PART_NOT_FORMAT = WS_ERR_DISKM_BASE + 0x107,	
    WS_ERR_DISKM_DEV_NODE_CHANGE = WS_ERR_DISKM_BASE + 0x108,	     
    WS_ERR_DISKM_DEV_PART_NODE_CHANGE = WS_ERR_DISKM_BASE + 0x109,	
    WS_ERR_DISKM_LOST = WS_ERR_DISKM_BASE + 0x110,	             
    
    //------------------------------- Platform ------------------------
    WS_ERR_PLAT_BASE = 0x40100000,
    WS_ERR_PLAT_OPERATE_FAIL    = WS_ERR_PLAT_BASE + 0x01,
    WS_ERR_PLAT_INVALID_PARA    = WS_ERR_PLAT_BASE + 0x14, 
    WS_ERR_PLAT_NOT_SUPPORT     = WS_ERR_PLAT_BASE + 0x100,
    WS_ERR_PLAT_NOT_INIT        = WS_ERR_PLAT_BASE + 0x102, 
    WS_ERR_PLAT_VDEC_HAS_OVER_FLOW = WS_ERR_PLAT_BASE + 0x104,
    WS_ERR_PLAT_TYPE_NOT_SUPPORT    = WS_ERR_PLAT_BASE + 0x105, 
    WS_ERR_PLAT_INIT_FAIL       = WS_ERR_PLAT_BASE + 0x106, 
    WS_ERR_PLAT_CACHE_EMPTY = WS_ERR_PLAT_BASE + 0x107,
    WS_ERR_PLAT_OUT_OF_MMZ_MEM = WS_ERR_PLAT_BASE + 0x108, 

    //------------------------------- Live ------------------------
    WS_ERR_LIVE_BASE = 0x40110000,
    WS_ERR_LIVE_OPERATE_FAIL    = WS_ERR_LIVE_BASE + 0x02,
    WS_ERR_LIVE_INVALID_PARA    = WS_ERR_LIVE_BASE + 0x14,  
    WS_ERR_LIVE_NOT_INIT        = WS_ERR_LIVE_BASE + 0x102, 
    WS_ERR_LIVE_GET_DATA_ERR     = WS_ERR_LIVE_BASE + 0x15,
    
    //------------------------------- Utility ------------------------
    WS_ERR_UTL_BASE = 0x40120000,
    WS_ERR_UTL_MALLOC_FAIL      = WS_ERR_UTL_BASE + 0x01,
    WS_ERR_UTL_OPERATE_FAIL     = WS_ERR_UTL_BASE + 0x02,
    WS_ERR_UTL_LOCK_INIT_FAIL   = WS_ERR_UTL_BASE + 0x10,  
    WS_ERR_UTL_LOCK_BUSY        = WS_ERR_UTL_BASE + 0x11,   
    WS_ERR_UTL_DOUBLE_UNLOCK    = WS_ERR_UTL_BASE + 0x12, 
    WS_ERR_UTL_DOUBLE_FREE      = WS_ERR_UTL_BASE + 0x13,   
    WS_ERR_UTL_INVALID_PARA     = WS_ERR_UTL_BASE + 0x14,   
    WS_ERR_UTL_NOT_SUPPORT      = WS_ERR_UTL_BASE + 0x100,
    WS_ERR_UTL_NOT_REALIZE      = WS_ERR_UTL_BASE + 0x101,
    WS_ERR_UTL_NOT_INIT         = WS_ERR_UTL_BASE + 0x102,  
    WS_ERR_UTL_FETCH_DOG_FAIL = WS_ERR_UTL_BASE + 0x103, 
    WS_ERR_UTL_RECT_END         = WS_ERR_UTL_BASE + 0x104,  
    WS_ERR_UTL_RECT_NORMAL      = WS_ERR_UTL_BASE + 0x105, 
    WS_ERR_UTL_SET_EXCEPTION_FAIL   = WS_ERR_UTL_BASE + 0x106,  
    WS_ERR_UTL_PUSH_ALARM_FAIL  = WS_ERR_UTL_BASE + 0x107,   
    WS_ERR_UTL_DISK_FULL_ERROR = WS_ERR_UTL_BASE + 0x108,
    WS_ERR_UTL_SET_EXCEPTION_STATE_FAIL   = WS_ERR_UTL_BASE + 0x109,
    
    //------------------------------- Remot_agent ------------------------
    WS_ERR_REMOTE_BASE = 0x40130000,
    WS_ERR_REMOTE_CONNECT_ERR = WS_ERR_REMOTE_BASE + 0x1,
    WS_ERR_REMOTE_STATUS_ERR = WS_ERR_REMOTE_BASE + 0x2,
    WS_ERR_REMOTE_LOGIN_ERR = WS_ERR_REMOTE_BASE + 0x3,
    WS_ERR_REMOTE_LOGOUT_ERR = WS_ERR_REMOTE_BASE + 0x4,
    WS_ERR_REMOTE_CON_REAL_ERR = WS_ERR_REMOTE_BASE + 0x5,
    WS_ERR_REMOTE_DIS_CON_REAL_ERR = WS_ERR_REMOTE_BASE + 0x6,
    WS_ERR_REMOTE_CON_VOICE_ERR = WS_ERR_REMOTE_BASE + 0x7,
    WS_ERR_REMOTE_DIS_CON_VOICE_ERR = WS_ERR_REMOTE_BASE + 0x8,
    WS_ERR_REMOTE_CHANNEL_ERR = WS_ERR_REMOTE_BASE + 0x9,
    WS_ERR_REMOTE_CLIENT_INIT_ERR = WS_ERR_REMOTE_BASE + 0x10,
    WS_ERR_REMOTE_RESOURCE_INIT_ERR = WS_ERR_REMOTE_BASE + 0x11,
    WS_ERR_REMOTE_CON_IPC_ERR = WS_ERR_REMOTE_BASE + 0x12,
    WS_ERR_REMOTE_DIS_CON_IPC_ERR = WS_ERR_REMOTE_BASE + 0x13,
    WS_ERR_REMOTE_GET_STATUS_ERR = WS_ERR_REMOTE_BASE + 0x14,
    WS_ERR_REMOTE_FIRST_GET_VIDEO_ERR = WS_ERR_REMOTE_BASE + 0x15,
    WS_ERR_REMOTE_GET_VIDEO_ERR = WS_ERR_REMOTE_BASE + 0x16,
    WS_ERR_REMOTE_FIRST_GET_AUDIO_ERR = WS_ERR_REMOTE_BASE + 0x17,
    WS_ERR_REMOTE_GET_AUDIO_ERR = WS_ERR_REMOTE_BASE + 0x18,
    WS_ERR_REMOTE_REL_VIDEO_ERR = WS_ERR_REMOTE_BASE + 0x19,
    WS_ERR_REMOTE_REL_AUDIO_ERR = WS_ERR_REMOTE_BASE + 0x20,
    WS_ERR_REMOTE_UNKONW_TYPE_ERR = WS_ERR_REMOTE_BASE + 0x21,
    WS_ERR_REMOTE_PUSH_DATA_ERR = WS_ERR_REMOTE_BASE + 0x22,
    WS_ERR_REMOTE_LIST_GET_NODE_ERR = WS_ERR_REMOTE_BASE + 0x23,
    WS_ERR_REMOTE_LIST_REL_NODE_ERR = WS_ERR_REMOTE_BASE + 0x24,
    WS_ERR_REMOTE_LIST_DIDCONTINUATION_ERR = WS_ERR_REMOTE_BASE + 0x25,
    WS_ERR_REMOTE_LIST_LAGER_ERR = WS_ERR_REMOTE_BASE + 0x26,
    WS_ERR_REMOTE_LIST_ADD_ERR = WS_ERR_REMOTE_BASE + 0x27,
    WS_ERR_REMOTE_LIST_HEAD_NULL_ERR = WS_ERR_REMOTE_BASE + 0x28,
    WS_ERR_REMOTE_LIST_NEW_ERR = WS_ERR_REMOTE_BASE + 0x29,
    WS_ERR_REMOTE_SET_LOCAL_TIME_ERR = WS_ERR_REMOTE_BASE + 0x30,
    WS_ERR_REMOTE_SET_NEW_MAGIC_ERR = WS_ERR_REMOTE_BASE + 0x31,
    WS_ERR_REMOTE_HTTP_START_ERR = WS_ERR_REMOTE_BASE + 0x32,
    WS_ERR_REMOTE_HTTP_SEND_ERR = WS_ERR_REMOTE_BASE + 0x33,
    WS_ERR_REMOTE_HTTP_RECV_ERR = WS_ERR_REMOTE_BASE + 0x34,
    WS_ERR_REMOTE_HTTP_CON_ERR = WS_ERR_REMOTE_BASE + 0x35,
    WS_ERR_REMOTE_PARA_ERR = WS_ERR_REMOTE_BASE + 0x36,
    WS_ERR_REMOTE_OPERATE_FAIL = WS_ERR_REMOTE_BASE + 0x37,
    WS_REMOTE_SYNC_IPC_TIME = WS_ERR_REMOTE_BASE + 0x38,
    WS_REMOTE_SNAP_IS_BUSY = WS_ERR_REMOTE_BASE + 0x39,

    //------------------------------- Update ------------------------
    WS_ERR_UPDATE_BASE = 0x40140000,
    WS_ERR_UPDATE_ERR = WS_ERR_UPDATE_BASE + 0x0,
    WS_ERR_UPDATE_FIND_FILE_ERR = WS_ERR_UPDATE_BASE + 0x01,
    WS_ERR_UPDATE_OPEN_DIR_ERR = WS_ERR_UPDATE_BASE + 0x02,
    WS_ERR_UPDATE_FILE_NAME_ERR = WS_ERR_UPDATE_BASE + 0x03,
    WS_ERR_UPDATE_NAME_SHORT_ERR = WS_ERR_UPDATE_BASE + 0x04,
    WS_ERR_UPDATE_EXT_ERR = WS_ERR_UPDATE_BASE + 0x05,
    WS_ERR_UPDATE_FILE_HEAD_ERR = WS_ERR_UPDATE_BASE + 0x06,
    WS_ERR_UPDATE_MD5_ERR = WS_ERR_UPDATE_BASE + 0x07,
    WS_ERR_UPDATE_VER_ERR = WS_ERR_UPDATE_BASE + 0x08,
    WS_ERR_UPDATE_LIST_ERR = WS_ERR_UPDATE_BASE + 0x09,
    WS_ERR_UPDATE_OPNE_XML_ERR = WS_ERR_UPDATE_BASE + 0x10,
    WS_ERR_UPDATE_OPEN_FILE_ERR = WS_ERR_UPDATE_BASE + 0x11,
    WS_ERR_UPDATE_OUT_OF_SPACE = WS_ERR_UPDATE_BASE + 0x12,
    WS_ERR_UPDATE_FIND_XML_ERR = WS_ERR_UPDATE_BASE + 0x13,
    WS_ERR_UPDATE_XML_ERR = WS_ERR_UPDATE_BASE + 0x14,
    WS_ERR_UPDATE_IS_UPGRADING = WS_ERR_UPDATE_BASE + 0x15,
    WS_ERR_UPDATE_WRITE_ERR = WS_ERR_UPDATE_BASE + 0x15,

    //---------------------------------Net_Server---------------------------
    WS_ERR_NET_SERVER_BASE = 0x40150000,
    WS_ERR_NET_SERVER_CHANNEL_INVAL = WS_ERR_NET_SERVER_BASE + 0x01,
    WS_ERR_NET_SERVER_SEND_DATA_FAIL = WS_ERR_NET_SERVER_BASE + 0x02,
    WS_ERR_NET_SERVER_CREAT_PTHREAD_ERR = WS_ERR_NET_SERVER_BASE + 0x03,
    WS_ERR_NET_SERVER_SEND_SYS_HEAD_ERR = WS_ERR_NET_SERVER_BASE + 0x04,
    WS_ERR_NET_SERVER_SEND_SPEAK_STREAM_ERR = WS_ERR_NET_SERVER_BASE + 0x05,

    //--------------------------------Schedule------------------------------
    WS_ERR_SCHEDULE_TIME_FAIL = 0x40160000,
    WS_ERR_SCHEDULE_TIME_RANGE_ERROR = WS_ERR_SCHEDULE_TIME_FAIL + 0x01,

    //--------------------------------Osd-----------------------------------
    WS_ERR_SOD_AREA_CONFLICT = 0x40170000,
    WS_ERR_SOD_NAME_ILLEGAL = WS_ERR_SOD_AREA_CONFLICT + 0x01,
    WS_ERR_OSD_NAME_COUNT_RESTRICTION = WS_ERR_SOD_AREA_CONFLICT + 0x02,

    //---------------------------------Ntp----------------------------------
    WS_ERR_NTP_NAME_COUNT_RESTRICTION = 0x40180000,
	WS_ERR_NTP_NAME_ILLEGAL = WS_ERR_NTP_NAME_COUNT_RESTRICTION+ 0x01,//add by lmw 20170516
    //---------------------------------Smtp---------------------------------
    WS_ERR_SMTP_SERVER_COUNT_RESTRICTION = 0x40190000,
    WS_ERR_SMTP_SENDER_COUNT_RESTRICTION = WS_ERR_SMTP_SERVER_COUNT_RESTRICTION + 0x01,
    WS_ERR_SMTP_SENDER_PWD_COUNT_RESTRICTION = WS_ERR_SMTP_SERVER_COUNT_RESTRICTION + 0x02,
    WS_ERR_SMTP_RECEIVER_COUNT_RESTRICTION = WS_ERR_SMTP_SERVER_COUNT_RESTRICTION + 0x03,
	WS_ERR_SMTP_RECEIVER_NAME_ILLEGAL = WS_ERR_SMTP_SERVER_COUNT_RESTRICTION+ 0x04,//add by lmw 20170516
    //---------------------------------Ddns---------------------------------
    WS_ERR_DDNS_COUNT_RESTRICTION = 0x401A0000,
    WS_ERR_DDNS_GET_MAC                = WS_ERR_DDNS_COUNT_RESTRICTION + 0x01,
    WS_ERR_DDNS_MAC_INVALID            = WS_ERR_DDNS_COUNT_RESTRICTION + 0x02,
    WS_ERR_DDNS_GET_IP                 = WS_ERR_DDNS_COUNT_RESTRICTION + 0x03,
    WS_ERR_DDNS_CREAT_SOCKET           = WS_ERR_DDNS_COUNT_RESTRICTION + 0x04,
    WS_ERR_DDNS_CONNECT_SERVER         = WS_ERR_DDNS_COUNT_RESTRICTION + 0x05,
    WS_ERR_DDNS_SEND_FAIL              = WS_ERR_DDNS_COUNT_RESTRICTION + 0x06,
    WS_ERR_DDNS_RECV_FAIL              = WS_ERR_DDNS_COUNT_RESTRICTION + 0x07,
    WS_ERR_DDNS_FIND_FAIL              = WS_ERR_DDNS_COUNT_RESTRICTION + 0x08, 
    WS_ERR_DDNS_CREATE_THREAD_FAIL     = WS_ERR_DDNS_COUNT_RESTRICTION + 0x09,
    WS_ERR_DDNS_DOMAIN_INVALID         = WS_ERR_DDNS_COUNT_RESTRICTION + 0x10,
    WS_ERR_DDNS_ALLOC_LESS_SIZE        = WS_ERR_DDNS_COUNT_RESTRICTION + 0x11,
    WS_ERR_DDNS_NOT_START              = WS_ERR_DDNS_COUNT_RESTRICTION + 0x12,

    //---------------------------------Sqlite---------------------------
    WS_ERR_SQLITE_BASE = 0x401d0000,
    WS_ERR_SQLITE_INVALID_PASER   = WS_ERR_SQLITE_BASE + 0x01,
    WS_ERR_SQLITE_INVALID_PARA   = WS_ERR_SQLITE_BASE + 0x02,
    WS_ERR_SQLITE_OPERATE_FAIL   = WS_ERR_SQLITE_BASE + 0x03,
    WS_ERR_SQLITE_TABLE_NOT_EXIST = WS_ERR_SQLITE_BASE + 0x04,
    WS_ERR_SQLITE_RECORD_NOT_FOUND = WS_ERR_SQLITE_BASE + 0x05,
    WS_ERR_SQLITE_DATABASE_CORRUPT = WS_ERR_SQLITE_BASE + 0x06,

    //---------------------------------Ptz----------------------------------
    WS_ERR_PTZ_BASE = 0x401E0000,
    WS_ERR_PTZ_OPERATE_FAIL    		= WS_ERR_PTZ_BASE + 0x01,
    WS_ERR_PTZ_INVALID_PARA    		= WS_ERR_PTZ_BASE + 0x14,  
    WS_ERR_PTZ_NOT_SUPPORT     		= WS_ERR_PTZ_BASE + 0x100,
    WS_ERR_PTZ_NOT_INIT        		= WS_ERR_PTZ_BASE + 0x102, 
    WS_ERR_PTZ_VDEC_HAS_OVER_FLOW 	= WS_ERR_PTZ_BASE + 0x104,
    WS_ERR_PTZ_TYPE_NOT_SUPPORT    	= WS_ERR_PTZ_BASE + 0x105, 
    WS_ERR_PTZ_INIT_FAIL       		= WS_ERR_PTZ_BASE + 0x106, 
    WS_ERR_CHARSET_CONVERT_ERR_BASE              = 0x401F0000,   //utf-8 gb2312 character encoding convert error

    WS_ERR_PTZ_FUNC_BASE =0x411E0000,
    WS_ERR_PTZ_FUNC_NOT_INIT=WS_ERR_PTZ_BASE + 0x01,
    WS_ERR_PTZ_FUNC_PARA_ERR=WS_ERR_PTZ_BASE + 0x02, 
    WS_ERR_PTZ_FUNC_CRUISE_LIST_IS_NULL=WS_ERR_PTZ_BASE + 0x03,
    WS_ERR_PTZ_FUNC_OPT_LIST_FAIL=WS_ERR_PTZ_BASE + 0x04,
    WS_ERR_PTZ_FUNC_CALLBACK_REPEAT=WS_ERR_PTZ_BASE + 0x05,
    WS_ERR_PTZ_FUNC_OPERATE_FAIL=WS_ERR_PTZ_BASE+0x06,

    //---------------------------------Sqltaskm---------------------------
    WS_ERR_SQLTASKM_BASE = 0x40200000,
    WS_ERR_SQLTASKM_INVALID_PARA = WS_ERR_RFM_BASE + 0x01,
    WS_ERR_SQLTASKM_NOT_INIT     = WS_ERR_RFM_BASE + 0x02,
    WS_ERR_SQLTASKM_OPERATE_FAIL = WS_ERR_RFM_BASE + 0x03,
    WS_ERR_SQLTASKM_NODE_EMPTY 	 = WS_ERR_RFM_BASE + 0x04,
    WS_ERR_SQLTASKM_NODE_TYPE 	 = WS_ERR_RFM_BASE + 0x05,

    //---------------------------------Status----------------------------------
    WS_ERR_STATUS_BASE = 0x40210000,
    WS_ERR_STATUS_OPERATE_FAIL    			= WS_ERR_STATUS_BASE + 0x01,
    WS_ERR_STATUS_INVALID_PARA    			= WS_ERR_STATUS_BASE + 0x02,
    WS_ERR_STATUS_SET_EXCPTION_FAILD   	= WS_ERR_STATUS_BASE + 0x03,
    WS_ERR_STATUS_GET_EXCPTION_FAILD  	= WS_ERR_STATUS_BASE + 0x04,
    WS_ERR_STATUS_FIND_PART_FAILD 		= WS_ERR_STATUS_BASE + 0x05,
    WS_ERR_STATUS_NOT_INIT            		 	= WS_ERR_STATUS_BASE + 0x06,
    WS_ERR_STATUS_MALLOC_FAIL   			= WS_ERR_STATUS_BASE + 0x07,
    WS_ERR_STATUS_EVENT_NO_CHANGE         	= WS_ERR_STATUS_BASE + 0x08,

    //--------------------------------linkage----------------------------//
    WS_ERR_LINKAGE_BASE = 0X40220000,
    WS_EER_LINKAGE_SNAP_SUB_SUCCESS = WS_ERR_LINKAGE_BASE + 0x01,
    WS_ERR_LINKAGE_SNAP_HAVE_NO_DATA = WS_ERR_LINKAGE_BASE + 0x02,

    //-----------------------------thread_manage-----------------------//
    WS_ERR_THREAD_MANAGE_BASE = 0X40230000,
    WS_ERR_THREAD_MANAGE_RESOURCE = WS_ERR_THREAD_MANAGE_BASE+ 0x01,					
    WS_ERR_THREAD_MANAGE_INVALID_PARA = WS_ERR_THREAD_MANAGE_BASE+ 0x02,			
    WS_ERR_THREAD_MANAGE_REMOVE = WS_ERR_THREAD_MANAGE_BASE+ 0x03,					
    WS_ERR_THREAD_MANAGE_POOL_ADD = WS_ERR_THREAD_MANAGE_BASE+ 0x04,				
    WS_ERR_THREAD_MANAGE_OPERATE_FAIL = WS_ERR_THREAD_MANAGE_BASE+ 0x05,

    //------------------------ live poll ------------------------//
    WS_ERR_LIVE_POLL_BASE = 0X40240000,
    WS_ERR_LIVE_POLL_NOT_SUPPORT_TYPE = WS_ERR_LIVE_POLL_BASE+1,
    WS_ERR_LIVE_POLL_CH_NUM_NOT_MATCH	=WS_ERR_LIVE_POLL_BASE+2,
    WS_ERR_LIVE_POLL_INVALID_PARAM		=WS_ERR_LIVE_POLL_BASE+3,

    WS_ERR_GPIO_MANAGE_BASE = 0x40250000,
    WS_ERR_GPIO_MANAGE_INVALID_PARA     = WS_ERR_GPIO_MANAGE_BASE + 0x01,
    WS_ERR_GPIO_MANAGE_NOT_INIT               = WS_ERR_GPIO_MANAGE_BASE + 0x02,
    WS_ERR_GPIO_MANAGE_OPERATE_FAIL      = WS_ERR_GPIO_MANAGE_BASE + 0x03,
    WS_ERR_GPIO_MANAGE_DRIVER_FAIL = WS_ERR_GPIO_MANAGE_BASE + 0x04,

	//----------------------P2PServer------------------------//
	WS_ERR_P2P_BASE						= 0X40250000,
	WS_ERR_P2P_PARAM_INVALID			= WS_ERR_P2P_BASE + 0x01,
	WS_ERR_P2P_USER_NOT_EXIST			= WS_ERR_P2P_BASE + 0x02,
	WS_ERR_P2P_DEVICE_NOT_EXIST			= WS_ERR_P2P_BASE + 0x03,
	WS_ERR_P2P_USER_NOT_APP_ONLINE		= WS_ERR_P2P_BASE + 0x04,
	WS_ERR_P2P_PASSWORD_NOT_MATCH		= WS_ERR_P2P_BASE + 0x05,
	WS_ERR_P2P_UUID_NOT_MATCH			= WS_ERR_P2P_BASE + 0x06,
	WS_ERR_P2P_WANIP_NOT_MATCH 			= WS_ERR_P2P_BASE + 0x07,
	WS_ERR_P2P_OUT_OF_MEMROY			= WS_ERR_P2P_BASE + 0x08,
	WS_ERR_P2P_DEVICE_ADD				= WS_ERR_P2P_BASE + 0x09,
	WS_ERR_P2P_DEVICE_UPDATE_LANIP		= WS_ERR_P2P_BASE + 0x0a,
	WS_ERR_P2P_DEVICE_WANIP_NOT_MATCH	= WS_ERR_P2P_BASE + 0x0b,
	WS_ERR_P2P_NO_ALARM_MESSAGE			= WS_ERR_P2P_BASE + 0x0c,
	WS_ERR_P2P_OUT_OF_RESOURCE			= WS_ERR_P2P_BASE + 0x0d,
	WS_ERR_P2P_OPERATION_TIMEOUT		= WS_ERR_P2P_BASE + 0x0e,
	WS_ERR_P2P_OPERATION_FAILED			= WS_ERR_P2P_BASE + 0x0F,
	WS_ERR_P2P_FILE_OPERATION_FAILED	= WS_ERR_P2P_BASE + 0X10,
	WS_ERR_P2P_SESSION_MISSING_PACKET	= WS_ERR_P2P_BASE + 0x11,
	WS_ERR_P2P_MESSAGE_SESSION_NOT_EXIST= WS_ERR_P2P_BASE + 0x12,
	WS_ERR_P2P_SESSION_NOT_EXIST		= WS_ERR_P2P_BASE + 0x13,
	
    WS_ERR_GENERAL_BASE = 0x40260000,
    WS_ERR_GENERAL_OPERATE_FAIL = WS_ERR_GENERAL_BASE + 0x01,
    WS_ERR_GENERAL_NOT_INIT = WS_ERR_GENERAL_BASE + 0x02,
    WS_ERR_GENERAL_GET_FAIL = WS_ERR_GENERAL_BASE + 0x03,
    WS_ERR_GENERAL_SET_FAIL = WS_ERR_GENERAL_BASE + 0x04,
    WS_ERR_GENERAL_LOGIN_FAIL = WS_ERR_GENERAL_BASE + 0x05,

    WS_ERR_PARSER_BASE = 0x40270000,
    WS_ERR_PARSER_NOT_INTI = WS_ERR_PARSER_BASE + 0x01,

    WS_ERR_LIST_STREAM_BASE = 0x40280000 ,
    WS_ERR_LIST_STREAM_PARAMERR = WS_ERR_LIST_STREAM_BASE + 0x01 ,
    WS_ERR_LIST_STREAM_NOSPACE = WS_ERR_LIST_STREAM_BASE + 0x02 ,

#ifdef  _SUPPORT_SYSLOG_
    WS_ERR_SYSLOG_BASE = 0x40290000 ,
#endif
} WS_ERR;


#ifdef __cplusplus
}
}
#endif

#endif //#ifndef _WS_COMM_ERRNO_H_


